import 'package:auto_size_text/auto_size_text.dart';
import 'package:flutter/widgets.dart';
import 'package:mobile_app.core/core/presentation/theme/theme.dart';

class NavigationBarTitle extends StatelessWidget {
  const NavigationBarTitle({
    required this.title,
    super.key,
  });

  final String title;

  @override
  Widget build(BuildContext context) {
    return AutoSizeText(
      title,
      style: CoreTheme.of(context).textTheme.navigationBarTitle,
      maxLines: 1,
      stepGranularity: 0.1,
      minFontSize: 15,
      textAlign: TextAlign.center,
      overflowReplacement: Container(),
    );
  }
}
